package com.woniuxy.driverschool.service.impl;/* *
@author author
@create 2021-09-29 20:09
*/

import com.woniuxy.driverschool.entity.DriverPackage;
import com.woniuxy.driverschool.mapper.DriverPackageMapper;
import com.woniuxy.driverschool.service.DriverPackageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DriverPackageServiceImpl implements DriverPackageService {

    @Autowired
    DriverPackageMapper driverPackageMapper;


    @Override
    public void addDriverPackage(DriverPackage driverPackage) {
        driverPackageMapper.insertDriverPackage(driverPackage);
    }

    @Override
    public void modifyDriverPackage(DriverPackage driverPackage) {
        driverPackageMapper.updateDriverPackage(driverPackage);
    }

    @Override
    public List<DriverPackage> getDriverPackage(DriverPackage driverPackage) {
        return driverPackageMapper.selectDriverPackage(driverPackage);
    }

    @Override
    public DriverPackage getDriverPackageById(int driverPackageId) {
        return driverPackageMapper.selectDriverPackageById(driverPackageId);
    }

    @Override
    public void removeDriverPackageById(int driverPackageId) {
        driverPackageMapper.deleteDriverPackage(driverPackageId);
    }
}
